<?php
/*
*
* index.php
* @author: rams
*
*/
require_once("config.php");
require_once("functions.php");

if (!$allow_url_fopen) {
	echo '<span class="error"><b>Note</b>: Please enable \'<em>allow_url_fopen</em>\' option in PHP configuration file</span><br/>';
}

require_once("Request.php");

$domain = $_REQUEST['domain'];
list($with_www, $without_domain) = get_domain($domain);

$req = new Request($without_domain);

//echo "<pre>";
//print_r($req->stats);
//print_r($req->sections);
?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="70%" align="left" class="dataLabel">Age</td>
    <td width="30%" align="left" class="dataField"><?php echo $req->get_age(); ?></td>
  </tr>
  <tr>
    <td colspan="2" align="left" height="10"><img src="file:///C|/wwwroot/spider-test/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
  <tr>
    <td align="left" class="dataLabel">IP Address</td>
    <td align="left" class="dataField"><?php echo $req->get_ip(); ?></td>
  </tr>
  <tr>
    <td colspan="2" align="left" height="10"><img src="file:///C|/wwwroot/spider-test/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
  <tr>
    <td align="left" class="dataLabel">Country (hosted in)</td>
    <td align="left" class="dataField"><?php echo $req->get_country(); ?></td>
  </tr>
  <tr>
    <td colspan="2" align="left" height="10"><img src="file:///C|/wwwroot/spider-test/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
  <tr>
    <td align="left" class="dataLabel"></td>
    <td align="left" class="dataField"></td>
  </tr>
</table>